package com.itheima.method;

public class method1 {
    public static void main(String[] args) {
        eat();
    }
    //方法的定义应该在主方法之外是并列关系
    public static void HelloWorld(){
        for (int i = 0; i < 5; i++) {
            System.out.println("HelloWorld");
        }
    }
    public static void eat(){
        study();
        System.out.println("吃饭");
    }
    public static void study(){
        System.out.println("学习");
        sleep();
    }
    public static void sleep(){
        System.out.println("睡觉");
    }
}
